package com.cmc.cloud.cmclink.doc.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
 * @Description: 分组汇总条件
 * @Author: lzp
 * @Date: 2025/11/6 18:28
 */

@Data
@NoArgsConstructor
public class VslvoyGroupByKeyDto {
    private String polCode;

    private String podCode;

    private String voyCodeIm;

    private String voyCodeEx;

    private String transmode;

    public VslvoyGroupByKeyDto(String polCode, String podCode, String voyCodeIm, String voyCodeEx, String transmode) {
        this.polCode = polCode;
        this.podCode = podCode;
        this.voyCodeIm = voyCodeIm;
        this.voyCodeEx = voyCodeEx;
        this.transmode = transmode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        VslvoyGroupByKeyDto groupKey = (VslvoyGroupByKeyDto) o;
        boolean flag = Objects.equals(polCode, groupKey.polCode) &&
                Objects.equals(podCode, groupKey.podCode) &&
                Objects.equals(voyCodeIm, groupKey.voyCodeIm) &&
                Objects.equals(voyCodeEx, groupKey.voyCodeEx) &&
                Objects.equals(transmode, groupKey.transmode);
        return flag;
    }

    @Override
    public int hashCode() {
        return Objects.hash(polCode, podCode, voyCodeIm, voyCodeEx, transmode);
    }
}


